<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>layui-hello</title>
    <link rel="stylesheet" href="layui/css/layui.css">
    <script src="layui/layui.js"></script>
</head>
<body>
<div class="layui-inline">
    日期<input type="text" class="layui-input" id="test1">
</div>

<script>
    layui.use(['layer','laydate'],function () {
        var layer = layui.layer
        var laydate = layui.laydate;
        laydate.render({
            elem:'#test1',
            trigger :'click'
        })
        layer.msg('hello layui!')
    })
</script>
</body>
</html>